import Vue from 'vue'
import App from './App'
import store from './store'
let WebIM = uni.WebIM = require("utils/WebIM")["default"];
let disp = require("utils/broadcast");
let logout = false;

Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$store = store
Vue.prototype.$connopen = function(opt){
	console.log(opt)
		uni.showLoading({
		  	title: '正在初始化客户端...',
		  	mask: true
		})
		getApp().globalData.curOpenOpt = opt;
		WebIM.conn.open(opt);
		getApp().globalData.closed = false;
		uni.hideLoading()
};
Vue.prototype.$connreopen = function(){
	if(getApp().globalData.closed){
		//this.open(this.curOpenOpt);
		WebIM.conn.open(getApp().globalData.curOpenOpt);
		getApp().globalData.closed = false;
	}
};

const app = new Vue({
    ...App,
	store
})
app.$mount()
